<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE HTML>
<html>
<head>
  <title>后台管理系统</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <link href="/resources/css/dpl-min.css" rel="stylesheet" type="text/css" />
  <link href="/resources/css/bui-min.css" rel="stylesheet" type="text/css" />
  <link href="/resources/css/page-min.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="container">

    <form id="searchForm" class="form-horizontal">
        <div class="row">
            <div class="control-group span8">
             名称：${data.nickName}(${data.account})
            <br/>
                现金奖：${money.cash}&nbsp;&nbsp;
                购物奖：${money.bonus}&nbsp;&nbsp;
                冻结金额：${money.frozenAmount}
            </div>
            <div class="control-group span12">
                <label class="control-label">时间：</label>
                <div class="controls">
                    <input type="text" class="calendar calendar-time" name="startDate"><span> - </span><input name="endDate" type="text" class="calendar calendar-time">
                </div>
            </div>

            <div class="span3 offset2" style="margin-left:20px;">
                <button  type="button" id="btnSearch" class="button button-primary">搜索</button>
            </div>
        </div>
    </form>

    <div class="search-grid-container">
        <div id="grid"></div>
    </div>
</div>
<script type="text/javascript" src="/resources/js/jquery-1.8.1.min.js"></script>
<script type="text/javascript" src="/resources/js/bui-min.js"></script>
<script type="text/javascript" src="/resources/js/config-min.js"></script>
<script type="text/javascript">
    var store,gridCfg;
  BUI.use(['common/search','common/page','bui/grid','bui/overlay','bui/form'],function (Search,Page,Grid,Overlay,Form) {
    var  columns = [
              /*{title:'编号',dataIndex:'userId',width:150},*/
              {title:'日期',dataIndex:'timeStr',width:150},
              {title:'变动类型',dataIndex:'type',width:120,renderer:function(value,obj){
                  if(obj.type=="FxFee"){
                      return "返现奖励";
                  }else if(obj.type=="TxFee"){
                      return "提现扣费";
                  }else if(obj.type=="FrozenCash"){
                      return "冻结现金余额";
                  }else if(obj.type=="AddCash"){
                      return "解冻现金余额";
                  }else if(obj.type=="FrozenBonus"){
                      return "冻结购物余额";
                  }else if(obj.type=="AddBonus"){
                      return "解冻购物余额";
                  }else if(obj.type=="TxPreFee"){
                      return "提现冻结费用";
                  }else if(obj.type=="TxRejFee"){
                      return "解冻提现费用";
                  }else if(obj.type=="TransferFrozenBonus"){
                      return "冻结转账购物币";
                  }else if(obj.type=="TransferFee"){
                      return "购物币转现金币";
                  }else if(obj.type=="TransferRejFee"){
                      return "解冻购物转账";
                  }else if(obj.type=='HandleFee'){
                      return "手动调整";
                  }else if(obj.type=='OrderFee'){
                      return "订单扣费";
                  }else if(obj.type=='TkFee'){
                      return "订单退款";
                  }else if(obj.type=='GoldFee'){
                      return "代理升级";
                  }else if(obj.type=='GeneralFee'){
                      return "代理升级";
                  }else if(obj.type=='PartnerFee'){
                      return "代理升级";
                  }else if(obj.type=='QyFee'){
                      return "区域奖励";
                  }
              }},
            {title:'变动现金',dataIndex:'cash',width:80},
            {title:'变动购物',dataIndex:'bonus',width:80},
            {title:'变动后现金余额',dataIndex:'afterCash',width:120},
            {title:'变动后购物余额',dataIndex:'afterBonus',width:120},
            {title:'变动后冻结余额',dataIndex:'afterFrozenAmount',width:120}
            ];
            store = Search.createStore('/userAmount/listDetails?userId=${data.id}');
            gridCfg = Search.createGridCfg(columns,{
              plugins : [BUI.Grid.Plugins.CheckSelection] // 插件形式引入多选表格
            });

  });

</script>
<script type="text/javascript" src="/views/js/list.js"></script>
</body>
</html>  
